Avoid unnecessary class generation when interface-parametrized collections are used