Hello,
I'm sorry but we can't go more far in this analyze of a custom code, as it's not our own code it take a too much time.
We can guide you methodologically to progress on your custom code, here the only solution if you wan't keep your override is to debug step by step.
But it's clear that variants process isn't easy to understand, and if these override's purpose was just to test, we only recommend you to remove this override view, and if the issue is still there we are back to your template root issue, and you have to contact your template creator.
Regards