Bug 20811: (RM follow-up) fix check for matching