lib/waypoints: quicker duplicate space removal