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

(cherry picked from commit 54c25ed3b8c3fbd63417515b6ffe55c4678c7065)