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.
(minor, efficiency) There is no sense using the Idemp function here; we know seq is initially empty, so exercising code to (vacuously) check CF_NULL_VALUE isn't present wastes a few instructions.
There is no sense using Append here, which wastes a few instructions vacuously running to the end of the list.
Using RlistPrependScalar() would simply do the minimal job needed, without any (abortive) checks or attempts to run to the end.