I don't actually need to loop through borders first. This is what the abyss policy is for, and I can simply check the iterator position to verify I am within buffer boundaries or not. This simplifies the code a lot. (cherry picked from commit c4ff8154)