BZ1173648: Guided Rule Editor: Allows you to use variables out of the scope of the pattern in LHS

(cherry picked from commit 266c03b78131003b760365697bffed125b6339ae)