This fixes #2415 by checking for exact equality of the type before shortcutting an unnessary projection.