Literally, “in good doing”, with a fossilized dative visible in the adjective (it was also present, however invisibly, in the gerund doen, as in governs the dative).
in goeden doen