[DF-2503] Fix to detect tilemask modification commands inside batches