FIX Zend\Db\Sql\Select: getRawState('order') is inconsistent after
calling reset() #5767
Merge pull request #5768