Bugfix for possibly rare cases with EPOCH counter
(cherry picked from commit 03f2140aadbec1097a5ffff23f9120873e6a53bc)

Signed-off-by: Andreas Neiser <neiser@kph.uni-mainz.de>