Better TERM=unknown handling
These patches have been carried in Ubuntu for a while, but I think they could be relevant to Debian as well, depending on your autopkgtest setup.
I couldn't figure out how to build the package from the repo, as the patches seem to be applied directly to the source tree?