Fix bug where Module classes with a private constructor cannot be instantiated