just an fyi for future readers, this mapping_hash calculation is altered here to ensure that the hash changes when the "global index" settings change - without this fix the hash would not have changed.