Dependency order for equations, eliminate variable aliases