How to reproduce:
1. Open the user attached "ResolveFailure.zip" project
2. Build the project (File -> Build Settings -> Build)
Expected result: Nothing of note happens after the Build finishes
Actual result: "exception Failed to resolve TVariableType" is thrown after the Build finishes
Reproducible with: 2020.3.33f1, 2020.3.35f1, 2021.2.18f1, 2021.3.1f1
Not reproducible with: 2019.4.38f1, 2020.3.32f1, 2021.2.17f1, 2022.1.0f1, 2022.2.0a12
Reproducible on: Windows, macOS Monterey 12.0.1 (Intel)