Changed Constraint class to better support integration with custom types in lambda functions.