cache hasOwnProperty
(cherry picked from commit a5454d6972063a65bfa0611a237663f19e509856)