I have an embedded VF page on the Opportunity page layout. When the Stage on an Opportunity reaches a particular stage, a workflow rule fires to update a checkbox field (Stage_To-Contract__c) as TRUE. The code in my embedded VF page below is then meant to check to see if that field is true, the StageName is set to a particular stage, and another custom field is set to "No". If all those events occur, a new VF page is opened and the Stage_To_Contract__c field is marked as false. The issue I am having is that the new VF page that opens is opening twice. Does anyone know why this may be occurring? I do think there is 1 or more before triggers on the Opp that are firing once before this page is called and then after, I just don't know if it's possible to prevent that in the page or if I have to prevent it in the trigger(s).
Embedded VF Page: