Adjust collision detection for brim and include support islands inside the only_retract_when_crossing_perimeters logic