I changed the Null Value option on three columns from Return Alternate on Null to Return Alternate on Null / Set Null on Alternate (value type) and the generated code was missing an End If - see below:
<Browsable(
BusinessFieldDisplayInEditor(), _
Description(
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
loValue =
<----- missing end if here.
Cheers, Peter