When inside an apt or yum task account for multiple conditionals. Fixes 4745.