It seems that there is a bug in aspnet-codegenerator. See this issue on .NET's issue tracker.
aspnet-codegenerator