#469 add hasownproperty to prevent references looking in the prototype

fix for issue in #469.

This pull request only addresses the head of master. If we want to address the previous branches I can add the fixes to those branches too.

thanks
Makes sense, I'd take the private helper though.