Fix debug builds for dynamic formats with TestD= test cases