Why doesn't this query return an error

Using Neo4j 4.0.5 on Desktop or an Enterprise instance running in EC2:

I had the following query in my ETL code that was loading my Graph Database from my old SQL database. There is an error in the query that I would have expected Cypher to return an error message for, however it ran the query and created blank nodes with no labels for the msg node. Since msg should be undefined (The actual error I made was forgetting to pass msg to my WITH). I would expect Cypher to return an error instead of blindly processing this. Making it way harder to find the error down the road.

         MATCH (msg:Message{uid: $uid})
        UNWIND $images as img
        WITH img
        MATCH (f:File{uid:img})
        MERGE (msg)-[:HAS_IMAGE]->(f)

Since msg is just a user defined variable it can be used multiple times and it will get overridden and won’t cause an error.