fix create_linked_enrollments for self-registration

test plan:
* create a course with a student
* create login credentials for the student
* enable self-registration for the root account for
 observers
* in a new session, visit the login page, and register
a new user to observe the student
* the new user should be enrolled in the student's courses

closes #CNVS-14585

Change-Id: I9f38d33b27136472a422abb044dabad9d13cff67
Reviewed-on: https://gerrit.instructure.com/39065
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>