mpe_loader already sorts work.staging_ds by the business key (buskey='LIBREF DSN VAR_NM') and aborts on duplicates before the post edit hook runs, so the same check in the hook could never fire. The check in %mpe_derived stays: it reads the control table, which can also be edited outside the app.