[MERGE #5166 @pleath] [MSFT 17513966] Handle case where a non-path type changes to a path type during enumeration
[MERGE #5166 @pleath] [MSFT 17513966] Handle case where a non-path type changes to a path type during enumeration

Merge pull request #5166 from pleath:17513966

It's now normal for, e.g., null or simple type to evolve to a path type.

Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore