Fixed colliding macro names and import names (#521)

Fixes #521. I updated the regex search to make the macros properties of the import name