MDL-38336 Incorrect TOC bulding when 'Display course structure' is on