diff --git a/templates/gitlab-ci-docker.yml b/templates/gitlab-ci-docker.yml
index dc9f9990122b88d1b32469e68785ef5affcd0d33..6ac8324f136c8ad9c7057a87fa3d1f56702d8c9e 100644
--- a/templates/gitlab-ci-docker.yml
+++ b/templates/gitlab-ci-docker.yml
@@ -138,7 +138,7 @@ stages:
         _cond_val=$(echo "$_cond_val" | tr '[:punct:]' '_')
         # retrieve comparison value
         _cmp_val_prefix="scoped__${_target_var}__${_condition}__${_cond_var}__${_test_op}__"
-        _cmp_val=${_scoped_var#$_cmp_val_prefix}
+        _cmp_val=${_scoped_var#"$_cmp_val_prefix"}
         # manage 'ignore case'
         if [[ "$_test_op" == *_ic ]]
         then