Fix detection of parameterized return types