[ Agda ] Changes in the termination checker.

See Agda issue 1023.