Sorted out the barriers/corners trouble left by r5844. No wonder