Thats an old bug, from what I understand, the red fountain is coded as (0,0) for the x,y coordinate system that lets the game know where to move.
This happened to me once, and what the minimap shows leads you to the enemy base/your base and then goes to the x,y coordinates.
I think it's a server issue where the game doesn't understand the movement command's coordinates due to lag/packet loss/monkey business and sets you on the default position of (0,0) until it gets The information. Pathing determines you're at (0,0) since that's where the server sets your path if you disconnect, and continues to set until you issue another movement command.
Since you're at (0,0), pathing works as normal, even though you aren't at a base.
TL;dr spam right click, and if that fails, go punch a kiwi fruit.