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.
I spy with my little eye something that's going to get a "this breaks rules against aliasing" warning ...
It's kinda boring, but correct, to write:
```
Rlist *seq = result.rval.item;
RlistAppendScalarIdemp(&seq, CF_NULL_VALUE); /* why, oh why, oh why ? */
result.rval.item = seq;
```