Merge pull request #930 from sipa/minireorg
Limit the impact of reorganisations on the database (fix #925)