BZ-1124885: Bug fixing on module generation