Fix parameter interpolation across merged lists

This was easier than thought. The problem:

   If two lists are merged (extended), and those lists use RefValues,
   then expansion (interpolation) won't work. The reason is that the
   DictPath includes the list indices, e.g. apt_repos:0:uri and those
   indices start at 0 for every list. Now, when two lists are merged,
   the reference to the base RefValue (in Parameters._occurrences) is
   overwritten by the RefValue of the mergee, causing it to not get
   expanded later.

Instead of just updating self._occurrences, we can populate it as we
update scalars, and on extending lists, we can add an offset to the
index in the path of the mergee.

Still: DictPath should go. One day…

Closes: #13
Signed-off-by: martin f. krafft <madduck@madduck.net>
2 files changed