Don't rely on map equals/hashCode; instead just iterate and call matches()