Apply scope after changing the table variables.