(ITS#6027) Debug() accesses free()-d memory in register_at() on error