Fix alias generation and bring back the tests for it.