Unexpected formation of β-lactams and penem isosteres from mesoionics: sequential ring-opening–rearrangement of [3 + 2] cycloadducts