Fix missing top queries for locks and temporary files in multiprocess mode.