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