Fixes #3437 : the commit has been lost in the 2.3->2.4 merge, adding it back