Fix fatal on empty query submodule list

Bug: 67577
Change-Id: I2a872f56a8c703da13f82570620d40928656a7ab
Merge "Fix fatal on empty query submodule list"