AnonymousHero: If the level generation routine cannot place the player (and thus regenerates the level) and the player happens to be entering a lost temple level where the relic has just been generated, then the god quest is automatically failed. Obviously, this is not what the player would expect.
(This is especially likely when playing with unusual rooms on.)
ToME Wiki