object.c: use BUG(...) no die("BUG: ...") in lookup_object_by_type()