Ghouls spawn instantly if they were activated on that map before. Since you went through that location to get the bloodstone, the ghoul was still activated when the cutscene began. This is normal behaviour. Getting stuck in the cave forever because of it is not. I will rework ghouls in the next few days to make sure that doesn't happen.
And just to make things clear. Did the ghouls attacked you instantly the FIRST time ever you entered the cave? Entering the caves for the first time on your save file should take 24 seconds for them to attack. Leaving the caves before 24 seconds passes resets the timer. Once they attack, they will spawn instantly every time you enter that cave again. Doesn't matter if you waited half a day or ten years.
I checked the code and did some testing and everything works as it should. The most likely thing is you trying to spawn them, leaving, saving and doing other things. Then returning back and they attacked you instantly because you activated them before.
I will try to look more into it though. Also, try to save in multiple slots when you can. Good for preventing situations like this. Plus there is a autosave slot that saves at the start of every week.