Patch Mako loader to use lock for ALL loadig operations