BZ-1013960: fixing support to the use of ternary expressions in variable replacements
(cherry picked from commit 64501a22e38c14c3e525df0dc2b517cc5de0448d)