Issue #2339877 by chr.fritsch: Move drupal_alter of elastica query to end