Fix MNG-5538

This applies the uploaded patch.