When a Text Property refers to itself, the world explodes

(Bug, Closed -> Fixed, Priority: Critical, Test Status: Unit tested , Reported By Justin du Coeur, )
Summary: This is the underlying problem behind the GBLS disaster, and is a P0 bug.
The symptoms we have been wrestling with are that the Greater Boston LARP Society Space has been DeadDeadDead for the past month. Even trying to load it causes all of Querki to choke and die. It's really quite horrible.
The problem was clearly an infinite loop: CPU spikes to a million percent on the node with GBLS loaded on it, and the cluster quickly falls apart. (That's a separate, and more serious, problem.)
Eventually tracked this down to a situation that is so easy that it is astounding it hasn't come up before: a self-referential Text Property. To be specific:
  • The Game Run Model has a Run Date Format Property.
  • The Run Date Format currently contains the text: {{_unknownName:[Run Date Format](Run-Date-Format)}}, **{{_unknownName:[Run Time](Run-Time)}}**.
  • Obviously, this is incorrect: the text contains a reference to itself.
  • The front page of the Space lists all open games, and their run dates, so we hit this Property, and boom.
It is amazing that we haven't hit this before -- while it's incorrect, it's a trivially easy mistake to make. We've simply lucked out previously.
QL is supposed to guard against this sort of thing -- that's why we have a depth counter as we resolve expressions. Why isn't this working here? This needs to be fixed and tested properly, so that we are guarded against it happening again.