consolidate the duplicate extension check (#4483)

1 file changed