Fix #323. Continuous queries should guard against data loops.