[avalanche] Early bail when no matchign slot exists
Summary: In cases where the end is at the end of the array, this ensure we don't access out of bounds. In practice, this isn't a huge deal because the value read is not used and, unless it happens to precisely match a page boundary, it can't fail. Still worth fixing.
Test Plan:
Repeatedly ran `ninja check-avalanche` under asan.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D6786