Crash when doing certain things if you had civigrant enabled but no longer do
FYI @colemanw (came up while reviewing 32311 since it happens when you delete a file, although it's only related to that PR because it calls hook_post)
What happens is during hook_post it calls onDeleteEntity which fails here because the entitymap includes things in cg_extends_objects which gets added to the map here. When you install civigrant it adds a grant option in there, and when you disable civigrant the option is still there, but the call to table() says civigrant doesn't exist.
I'm marking it regression since the onDeleteEntity was added recently, although it's possible this might have come up a different way earlier.