Fixes #656. Fixes #660. Regression from commit e1ecf950e2, "main: Do path expanstion after alias expansion" (sic).
e1ecf950e2