BZ1173842: DSL and Guided Rules fail when using 'then' in DSL definition

(cherry picked from commit 29769b4eb9bccdec0c00cf4f1c5e3023ca61cbcf)