Workaround to fix incorrect casting of a dynamic result in tests.