Redmine/6553: Fix implicit looping over multiple lists

Pull request for initial review of the changes to the code. Planning to add more test coverage to the acceptance test before merging.
No it won't (and the test still passes). The point of the fix is that this second promise is a no-op - the iterator is identified as having a list inside that has zero entries, so no iterations will be performed. No promise actuation, hence no additional line.