Correct UnboundLocalError exception in student_migration_35

I ran into this on one of our sandboxes.