Bug fix related to unique indexes on deletion.