Randomly getting entity has incorrect type for being called as a function
I have a good sized cfc with several functions in it, I am going through and trying to re-code it some so that it does not include cfobject's that refer to itself.
For example making a cfobject of the cfc as "Mainfunctions" and then calling functions such as cfset x=MainFunctions.MakeRandomString(Length=5)
I want to just do cfset x=MakeRandomString(Length=5)
Now the problem I am having is that I go through and make the rewrites and test it and it works fine, and then periodically I get a random error telling me
"Entity has incorrect type for being called as a function. The symbol you provided MyFunctionName is not the name of a function"
However testing it on the exact same page, with the exact same parameters it will work perfectly fine.
I am testing this on CF9, I have scoped out all the variables I can find, defining them at the start of the function using var.variablename and referencing the function arguments with arguments.ArgumentName
I am completely baffled as to why this is happening and appreciate any suggestions.
Thanks,
