Merge "C2 VTS: Cleanup code around query() calls"