Fix #178 - make sure qualified names are taken into account when sorting definitions.