Use hiera_hash(...) instead of hiera(...) so that matches throughout the Hiera hierarchy can be merged.

See https://docs.puppetlabs.com/references/latest/function.html#hierahash