Add patch to fix query parse bug #5390

#5390 

#### Changes

* Added core patch from https://drupal.org/node/2143461