I just got updated to 7.0.24. I am still able to reproduce this.
Here is my docoument alias tree:
{Root}
-Folder1 (1 level)
--Business (2 levels)
---Core (3 levels)
---Core-Special (3 levels)
--Business-Special (2 levels)
Here is the code I am using for a Static Html WebPart on my page.
<a href="~{%if (CurrentDocument.DocumentsOnPath.Count>2,
CurrentDocument.DocumentsOnPath[CurrentDocument.DocumentsOnPath.Count-2].NodeAliasPath,
CurrentDocument.DocumentsOnPath[1].NodeAliasPath)
%}
</a>
If viewed on the Core-Special page, the static generated is
<a href="/Folder1/Business/Core.aspx">
Core
</a>
It should be
<a href="/Folder1/Business.aspx">
Business
</a>
I know for this case I could use the Parent instead of walking the DocumentsOnPath collection, but in some cases, I don't pull the parent, I pull a document from a different level, but I can't guarantee that the DocumentsOnPath is accurate due to this issue.