Avoid null reference errors for scope which can occur with some xml-ish lookups.
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java
index 8afeb80..4567d4f 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java
@@ -241,7 +241,7 @@
             {
                 ASScope scope = getASScope();
 
-                if (scope.isPackageName(ref))
+                if (scope != null && scope.isPackageName(ref))
                     isPackage = true;
             }
         }