Fix bug in new TempBuffer code.