Fixes #6037: Replicate #5772 in 2.11

http://www.rudder-project.org/redmine/issues/6037