Fixed error in My profile > Forum Posts > Discussions (https://tracker.moodle.org/browse/MDL-39788)