MDL-38173 Course: Fix DB from regression when adding a (new) course module to a section.

Updated to remove performance fix from first upgrade step.