Remove duplicate function and harmonize with upstream Drupal/Pressflow