In the first game, I closed no locations, and the game ended by magga eating the last card from the board.
In the second game, I encountered the last card myself to trigger the end.
Not sure if this helps anyone or not
I believe Faranim nailed it. I'd recommend if someone is still stuck on HCtF - try to manipulate the game, so it is your character who encounters the last location deck card in the game, as opposed to letting Black Magga eat it.