Port of !17 (merged) to v2021
This includes https://github.com/go-debos/debos/pull/253/commits to fix T7803.