Merge "Throw IllegalStateException when inserting an existing item" into main