Release taken references to CodeContext after using it [#712694] and keep custom invocations of parse_file() possible [#791936]