How to compile a legacy engine version from source?

I recently synced my local release branch without knowing of a nasty bug that basically makes it impossible to compile to iOS using the remote compile mechanism. This is a known bug (here) that has since been fixed, however for engine version 4.22 which is not yet out on the release branch. I tried to cherry pick this commit individually but there are dependencies. I also tried running the master branch instead but for some reason the master branch doesn’t have structbox, which I need for my project. Same for the promoted branch.

I then decided to try to use the 4.20 branch to see if I can roll back to a version I know works, however that branch is not stable - it builds but then crashes when I try to run it.

Which means I’m basically f**'ed - I can’t use the “stable” release branch because it doesn’t compile for my target platform, I can’t use the master or promoted branches because they are missing structbox and I can’t go back to 4.20 because the branch is not stable. How do I get out of this situation? Is there a reliable way to roll back to a previous engine version?