I seem to be having a similar problem (although I never tried to use a custom function as a contact).
I made a number of changes to my program that mostly involved a lot of rearranging and renaming of my custom functions (I'm going to be turning the code over to other developers so I didn't want to present them with a confusing mess). Now the program won't upload to the PLC yet if I just compile it I don't get any errors so I have no way of knowing what the problem is.
Here's a capture of what's being sent and received on the serial port when I try to transfer the program:
#05
#05
IR#0D
IR01*#0D
@01IR5A*#0D
@01IR015B*#0D
@01$v?
??13*#0D
@01$vPS10*#0D
@01LT59*#0D
@01LT025602560512006400646016025617405D*#0D
@01VM5A*#0D
@01VMT100MD+r4962*#0D
Maybe that will make sense to someone there.
Here's a link to the project in case you can determine a cause from looking at it:
http://www.prodevinc.com/downloads/FlexPLC1.zip