fixed `DBHistory` behaviour

When manual flush was emitted inside rolledback transaction
the state of `DBHistory` was wrong.