Supercurrent in the Presence of Direct Transmission and a Resonant Localized State