Hack around some issues in the modules implementation and a type checking issue
in the translated code