Update sortDegens to use 4 bit encoded distance.