Fixed #187 differently because the previous fix introduced bugs. This
fix is more complex because we need to recursively propagate through the
interpreter pattern that typeOf should not instantiate type parameters.