presto-main/src/main/java/io/prestosql/sql/analyzer/AggregationAnalyzer.java/AggregationAnalyzer/hasOrderByReferencesToOutputColumns
class AggregationAnalyzer:    private boolean hasOrderByReferencesToOutputColumns(Node node)
    {
        return hasReferencesToScope(node, analysis, orderByScope.get());
    }