Fixing a bug with versionOf feature

In 3-tier version setups, aliases were not getting correctly set for files
in the middle version.