Fix error with undefined $project_access variable when accessing records not through a project.