Sort list of sharing nodes (fixes #266)