Tighten the check for a match by number

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>