WIP: it almost compiles with the new alias expansion logic