check_static_recursion: Handle foreign items