mapDB persistence problem

I’m trying to persist some Color items after openhab restart with mapDB (e.g. PoolAnimationCol2)
Group PoolAnimationCols (gMapDB)
Color PoolAnimationCol2 (PoolAnimationCols)

mapDB.persist:
Strategies {
default = everyChange
}
Items {
gMapDB* : strategy = everyChange, restoreOnStartup
}

There are two things that are weird:

  1. According to the log, mapDB persistence happens before the item is updated.
  2. For PoolAnimationCol2 mapDB always stores a state 0 and not the color. In the log below. Both, previous and actual color states are not 0. why does mapdb persist a state of ‘0’?
    I’m using Openhab2, the distro that came with the Pine64.
    I’m kind of stuck here.

06:37:51.090 [DEBUG] [pdb.internal.MapDBPersistenceService] - Stored 'PoolAnimationCol2’ with state ‘0’ in mapdb database
06:37:51.096 [INFO ] [marthome.event.ItemStateChangedEvent] - PoolAnimationCol2 changed from 60,0.8333333333333334,0 to 60,1.694915254237288,23.137254901960784

Guess my problem with MapDB is related to https://github.com/openhab/openhab/issues/4537 ("[MapDB] stores dimmer item states always as ‘0’")

The issue has been solved recently: https://github.com/kaikreuzer/openhab-core/pull/70/commits/86b807c142b606313656f450c84617463a02c761