Fixed bug causing the "controller with mocks" functionality not to work.
Additionally fixed another bug that caused the index number of the generated AngularJS module (making it unique) never to be increased.