improve check for whether user var exists as class member, fixed #1970
Merge pull request #1971 from Guite/1.4

improve check for whether user var exists as class member, fixed #1970