Fix incorrect searching against pending matches (fixes #10)