In a fix to T34168 (bug 32168) rSVN103208 in line 458 introduced a case where relative URL (the one NOT containing "/") will *not* be expanded with $wgServer.
This caused T39868 (bug 37868) as well as ancillary issue with T40048 (bug 38048, wrong redirect).
I believe this behaviour should be reinstated.