Fixed a bug in detecting duplicate rows when one already has been allocated to a budget bucket.