This `dict(foo, **bar)` hack only works if all the keys in `bar` are bytestrings. Rather do it the long way around by creating a new dict and updating it twice.