Fixed an object.hasOwnProperty('hasOwnProperty') bug.
(cherry picked from commit 5026224597bfee903b4cadf051d22af0a2ff1620)