In case one of histories is too small increase all

Otherwise they have different size, while they should be synced.

Thanks to Daniel R., a.k.a. reicheltd, and ranousse.
Merge branch 'fix-segfault-on-startup-due-to-history-load'

Fix for loosing history allowed this bug to actually happen, it was
there for quite long period of time, but was unseen as the other bug
didn't let it happen.