Closed #3369 : Rewrite logic of NO_BORDER adaptation