Well, that was the other option. I tried `postFlush` first, as that was easiest for me, however there were some problems and I couldn't get that to work (can't remember why now). 

But I am happier with doing it `onFlush`, it seems cleaner to not perform another flush and set a precedent for similar stuff to flush in `postFlush` **again**. What do people think?

Otherwise I am happy to leave this method as it is, its not 100% clear to me if there is a better way to do it, or if the functionality should be in the DocumentManager, but the method does work.