Do not try to match against unused constraints. Closes gh-592.