CONTRIB-5470: Fixed
https://tracker.moodle.org/browse/CONTRIB-5470