Fixes NPE's if PatternNode root is wildcard