It probably is not good call setup_portal_student here. This creates the learner object if it doesn't exist, and we've used the existance of the learner object to indicate that student has run a runnable.  It looks like it is already bailing out if learner is null, so if you look up the leaner without setup_portal_student you should be good.