Fix implied evals and doubled definition of variable

fixes #7119
fixes #7120
fixes #7121
fixes #7122
Merge pull request #7133 from owncloud/fix-implied-eval

Fix implied evals and doubled definition of variable