Implement lock to prevent module registration post-load