Fix call to a member function is_restricted() on a non-object.