Calling $PAGE->requires->js before require_login($course) causes an erro...

...r when force language is set for a course (see MDL-33887)