Adding flattening for target assertion