Removing unneeded has_key calls.