Construct target and query FileLists inside matches block.