I had a nearly identical experience. One thing I still do not understand is that generating return address labels of this form works fine:
retAddr = "return_" + str(globalCounter)
globalCounter += 1 #increment when handling any command
However, generating a name which consists of the function name plus a "call counter" does not work:
retAddr = "return_" + functionName + str(functionCounter)
if handlingCall:
functionCounter += 1 #increment only if handling a call command