Correct assert and add with_items test

Correct msg assertion and add a test for #5965 that uses `with_items`