Fixes for uninstalling modules (http://drupal.org/node/1897900)