GROOVY-9577: maintain insertion order of imports and retain duplicates

- lazily create name to node map
4 files changed