Fix real_name call when index doesn't exist.

This moves the check for a 404 on the _alias endpoint from the exists
method to real_name, since various bits of code expect that to work.