Fix a problem with desugaring patterns containing nested datatypes.

Wildcards were being used too liberally in the derived patterns,
meaning that datatype clauses were not always correctly matched when
they were heavily nested inside a single pattern.