Issue #2357437 by djdevin: Fixed Prevent accidental deletion of course from self-referencing objects.