(PUP-3604) Rework handling of :ensure with a version