Fixing a typo (thanks @marklanz)
handles case where merged_cells are given as arrays instead of hashes.
Merge changes from upstream