[imp] add extra check to avoid inserting custom or duplicated tags