Fix getting the wrong faction from player

This fixes factions getting the wrong faction from a player. Before it was returning a wrong faction and the player could not build in his/her own land.