#747998 by aaron: Fix error getting media in library: hook_file_insert must not reference a variable.