Since the PR to do this deeper in the stack was declined, we'll do it ourselves. This ensures that we don't accidentally mutate the input and then compare that mutated form to the result (which caused previous test failures).