fix: global definition shadowing a local one when using dot-notation

closes #3079
2 files changed