generate unique IDs when two members have the same name but different scopes (#539)