Sort selection matches by layer order then by distance from the click.
Revert "Modified to 5 pixels (instead of 15) to prevent clicking on a nearby object"

This reverts commit bf1b13d66bc7fde94e784392c6c55f70eb83440f.