Runs the exit functions of any exiting queries BEFORE the enter functions of any matching query.