I encountered an issue in moving from 5.005 to 5.6 in which a complex project, with lots of use and require statements, stopped working with a similar error. It may be completely unrelated to your problem, but in that case, it turned out to hinge on some subtle change in the order in which libraries were loaded. To fix it, we added a few more explicit use statements to ensure that the relevant module was loaded before anything that tried to use it.
Along these lines, you might want to check that your library is actually being loaded when you think it is, by adding a "warn 'Declaring isLocalUser'" statement right above the "sub isLocalUser { ... }" declaration and ensuring that it shows up when your program loads.