Fix dictionary order dependence in creating aliases.
Fix dictionary order dependence in creating aliases.

This leads to sporadic failures under Python 3 with randomized hash.

pombredanne/importmagic,birkenfeld/importmagic,alecthomas/importmagic