We had discussed this once before, IINM, and determined that it is not a bug.
If a player is stupid enough to block himself off from his own goal then he
should have to forfeit. The program works just fine. :-)
I think the problem is that if player A cuts themselves off from their own
goal then player B has no legal moves next turn and is eventually forced
to resign (B is penalised for A's mistake).
A player can theoretically win every game by fencing themselves off and
waiting for 21 days to elapse.