Yes - a nucleophile can replace itself in a substitution reaction. Under the SN1 mechanism, once the carbocation is formed, it becomes prone to attack from any negatively charged species, including the one that left it in the first place. Likewise, in an SN2 reaction, there is the possibility of a nucleophile replacing itself. Given enough time, I would expect alkyl halides to become racemic in solutions that contain the halide anion; however, substitution reactions remain stereo-selective. This is because when you are preforming a substitution reaction, you normally use a better leaving group than the nucleophile that you are adding. Because of this, the nucleophile in solution will preferentially replace the initial leaving group over its resulting product. This is because the rate laws for both SN1 and SN2 reactions depend on the concentration of the alkyl group - implying that an alkyl group with a better leaving group will react faster than one with a weaker leaving group. In SN1, the rate determining step is the leaving group dissociating from the carbocation, which happens quicker with a better leaving group. In an SN2 reaction, the rate determining step involves both the nucleophile attacking and the leaving group leaving. This - once again - means that the reaction will proceed quicker with a better leaving group. Given enough time, your product should racemize; however, your substitution reaction should be done before this can have a major effect on your yield.