#1923: Changed type discovery to return only generic types with exactly the same type parameter and adapted the unit test accordingly.