fix bug when using match_all and child queries

cbugg: close bug-404