In informal spoken English, one encounters sentences like this:
?That's the man who I wasn't sure where he had gone.
This construction doesn't strike me as quite right because it sentence includes not only the relative pronoun who but also the relativized pronoun he. In more typical relative phrases, the relativized element is deleted: _That's the man who was lost, not *That's the man who he was lost. In who I wasn't sure where he had gone, though, the relativized pronoun is in a nested relative clause introduced by where, which inhibits the deletion: *That's the man who I wasn't sure where had gone doesn't work. If the nested relative clause is introduced by that, one can't delete the relativized element and preserve that: That's the man who I thought was lost or ?That's the man who I thought (that) he was lost, but not *That's the man who I thought that was lost. But where, like most subordinators but unlike that, cannot be omitted when it introduces a relative phrase.
There's often no good alternative to these constructions, though. My ?who I wasn't sure where he had gone example might be recast as That's the man whose whereabouts I wasn't sure of, but this means something subtly different and requires turning the simple verb gone into the clunkier whereabouts. (Many alternatives to these constructions require changing the secondary relative clauses into verb nominalizations, similarly, and any good style manual warns against overuse of verb nominalizations.)
So, two questions: (1) Are constructions that repeat relativized elements in relative phrases ever acceptable in formal writing? (2) If not, am I missing a good standard method of recasting these constructions as something unambiguously grammatical?