Correctly init UserFile's context fixing $stream->context

Fixes #1991.