I found out how to do that using the developer console mod.
1 - Be the king
2 - Conquer the city/castle
3 - Give the fief to anyone during the vote
4 - Install the mod "Developer Console"
5 - Run "campaign.give_settlement_to_player FIEF_NAME_HERE"
Well, until they fix it, at least.