Is there a better way to write this code? I tried to make it so innerCb is called exactly once (either on match or after all entries have been testsed and there's no match).