remove deprecated lexical_ordering() usage

This could also be `(a.kind, a.location.to_string()).cmp(&(b.kind, b.location.to_string()))`. I don't know which one is preferable.