Backport Fix/3.x/issue 3542: [optimizeQueries Map config property cannot be set declaratively]

Backport PR for issue #3542