skip vars with invalid end locs

otherwise we will crash on the invalid locations