Issue #2198363 by jamestamr: Correct queries in hook_uninstall().