Prevent OoC search indexes from going out of bounds (fixes #51)