fixed bug #77844
duplicate key error on duplicate category ids