Fix a problem with generating a constructor when it is first time added.
Merge pull request #255 from jakzal/generate-constructor-fix

Fix a problem with generating a constructor when it is first time added.