IMPROVED: correctly detect circular dependencies when using path aliases (amd)
ADDED: new test for circular dependencies with path aliases