Removes duplicate defines, updates comments
Merge pull request #5539 from mwerezak/fix-5529

Fixes #5529