See review on #3588 for switching to a border based approach.