non-rectangular commonItemsMatrix, updated unit tests