Fixing migration errors: refactoring of processStatementLabel() reverted as it introduced incorrect logic changes