I have exactly the same problem: When executing an console command, I sporadically get an error in a piece of code which works completely fine otherwise!
reproductionManager.reproduce.call(creep);
TypeError: Cannot read property 'call' of undefined
In regular script execution, this code works without problems! Just if I type a console command, I get this error now and then!
I guess this has to do with a similar issue (which I already created a post about), that the regular code is not accessible from console anymore (Prototype declarations, enhancements of the global object, etc.)! :-((