Fix regression with implicits, add a test

This was due to the previous erasure fix, which is now handled a
different way, leaving pattern types in unnormalised form during
typechecking to give unification/matching more to work with.