Keep track of the parent alias when aliases are mapped

This fixes the test in the previous commit
2 files changed