Or at least abstract the two duplicate `infer` calls ...