Fix up the 'needle' matching code a bit.

Signed-off-by: Ben Greear <greearb@candelatech.com>