Fix integrity constraint violation when reverting features

See http://drupal.org/node/737816#comment-6978566