Move dbg header to tests, which is the only place it's used.