BZ-1013682 - GRE doesn't recognize formulas, calls on globals, etc. when reopening rule

(cherry picked from commit ead5293c660dee6ce846c542ce6212ceb5e061b6)