fix some broken tests after the module name canonicalisation change
support chained aliases; a -> b and b -> c now behaves as a -> c