This is probably due to the fact that it does not store the random seed in the save game, instead using a new one every time you load. The test would be to reload, and if it doesn't attack you again, reload again and again until it does. I don't think the chance of attack is very high, so you would have to do it a good number of times. It is exploitable, and could be fixed by determining a random seed at the start of the game and keeping it until the end of the game.
You can also exploit the same flaw when visiting goodie huts to get the item you want.