Fixed get function

Same error as for the set function
Added test for get/set issue without virtuals
Merge pull request #171 from johanneslumpe/patch-8

Getter fix +  tests