remove duplicated-amp edge case, add generic duplicate support to frontend