[FIXED JENKINS-19488] Expand variable in a consistent way
[JENKINS-19488] test for #938
Merge pull request #938 from vjuranek/vjuranek-JENKINS-19488