Merge configs with ancestors (Fixes #820)

(Fixes #820)