fixes #7461: Desynchronization in processing of palette and update.