Error when using "Merge Overrides" in Puppet Class Parameters and macros in Hiera

I do understand that the merge overrides require hashes or arrays, it works absolutely fine with arrays/hashes until I use ERB to insert values in a hash (like the <%= foreman_server_fqdn %> example given in my question). Since the same hash works fine when merge overrides are disabled, and as seen in the logs, I believe I might be hitting some bug within the merge overrides functionality