Remove duplicate code of speed limit link endpoint calculation