Removed overly dougly use of hasOwnProperty