Fixed merging options dict

Fixes issue #12523