Remove an unused as-pattern in checkDef.