This is done to ensure the objects exactly match the schema/types during tests. Fixes part of #32326.