Fixed ERRAI-529: IoC generates invalid code for some usages of generics