collect vars-set after compiling patterns