This commit is a better implementation 9b2450e8b6 for stable as it has less impact on existing data.
9b2450e8b6