Test via `hasOwnProperty` rather than `in`.