Loosen pattern matching rules in ContractGenerator