attempt to solve #596 by limiting occurrences of type in its supertypes