BUG: fix replace bug where different dtypes in a nested dict would only replace the first value
Merge pull request #6820 from cpcloud/replace-dtype-bool-fix

BUG: fix replace bug where different dtypes in a nested dict would only replace the first value