Fix merging of parameters

The merging logic was wrong, inverting the behaviour of parameter
merging, somewhat anyway.

This is now fixed. Entities are collected in a list, and then the list
is reduced through merging the second element into the first. The entity
of the current level is only merged once, at the very end.

Signed-off-by: martin f. krafft <madduck@madduck.net>
3 files changed