The memory manager isn't necessarily initialized during moduleLoad(),  so nothing which might touch smart objects should be done here (this includes hooking functions) or it'll cause issues in Repo mode.  Use moduleInit() instead.