Use hasOwnProperty in heap dump code