anchor.diff:  
     @override
     void visitFieldDeclaration(FieldDeclaration node) {
  -    for (var variable in node.fields.variables) {
  -      var parent = node.parent;
  -      // see https://github.com/dart-lang/linter/pull/2189#issuecomment-660115569
  -      // We could also include public members in private classes but to do that
  -      // we'd need to ensure that there are no instances of either the
  -      // enclosing class or any subclass of the enclosing class that are ever
  -      // accessible outside this library.
  -      if (parent != null &&
  -          (Identifier.isPrivateName(variable.name.name) ||
  -              _isPrivateExtension(parent))) {
  -        _visit(variable);
  +    var parent = node.parent;
  +    if (parent != null) {
  +      var parentIsPrivateExtension = _isPrivateExtension(parent);
  +      for (var variable in node.fields.variables) {
  +        // See
  +        // https://github.com/dart-lang/linter/pull/2189#issuecomment-660115569.
  +        // We could also include public members in private classes but to do
  +        // that we'd need to ensure that there are no instances of either the
  +        // enclosing class or any subclass of the enclosing class that are ever
  +        // accessible outside this library.
  +        if (parentIsPrivateExtension ||
  +            Identifier.isPrivateName(variable.name.name)) {
  +          _visit(variable);
  +        }
         }
       }
       super.visitFieldDeclaration(node);
     }
   
     @override
  -  void visitNode(AstNode node) {
  -    var parent = node.parent;
  -
  -    Element? element;
  -    if (parent is AssignmentExpression && parent.leftHandSide == node) {
  -      element = parent.writeElement?.canonicalElement;
  -    } else {
  -      element = node.canonicalElement;
  -    }
  -
  -    if (element != null) {
  -      if (parent is Expression) {
  -        parent = parent.unParenthesized;
  -      }
  -      if (node is SimpleIdentifier && node.inDeclarationContext()) {
  -        // ok
  -      } else if (parent is PostfixExpression &&
  -          parent.operand == node &&
  -          parent.operator.type == TokenType.BANG) {
  -        // ok non-null access
  -      } else if (parent is AssignmentExpression &&
  -          parent.operator.type == TokenType.EQ &&
  -          DartTypeUtilities.isNonNullable(
  -              context, parent.rightHandSide.staticType)) {
  -        // ok non-null access
  -      } else {
  -        nullableAccess[currentUnit]?.add(element);
  -      }
  -    }
  -    super.visitNode(node);
  +  void visitPrefixedIdentifier(PrefixedIdentifier node) {
  +    var element = node.staticElement?.canonicalElement;
  +    _visitIdentifierOrPropertyAccess(node, element);
  +    super.visitPrefixedIdentifier(node);
  +  }
  +
  +  @override
  +  void visitPropertyAccess(PropertyAccess node) {
  +    var element = node.propertyName.staticElement?.canonicalElement;
  +    _visitIdentifierOrPropertyAccess(node, element);
  +    super.visitPropertyAccess(node);
  +  }
  +
  +  @override
  +  void visitSimpleIdentifier(SimpleIdentifier node) {
  +    var element = node.staticElement?.canonicalElement;
  +    _visitIdentifierOrPropertyAccess(node, element);
  +    super.visitSimpleIdentifier(node);
     }
   
     @override
  
positive.code:     }
      lateables[currentUnit]?.add(variable);
    }
  }
  
negative.code:       if (areAllLibraryUnitsVisited) {
          _checkAccess(libraryUnitsInContext);
  
          // Clean up.
          for (var unit in libraryUnitsInContext) {
            lateables.remove(unit);
            nullableAccess.remove(unit);
  