Stereochemistry of Gabriel Synthesis

I read that the primary amine product of Gabriel Synthesis is a racemic mixture. However, when analyzing the reaction the stereochemical step(s) are all $S\_N2$. Thus, I figured if you are careful you can track the stereochemistry of the (or both) $S\_N2$ reaction(s). Can anyone clarify this for me?




The lower part of the Dutch wikipedia about the [*Gabrielsynthese*](https://nl.wikipedia.org/wiki/Gabrielsynthese) indeed displays an example where this reaction is carried out to yield a secondary amine:


[![enter image description here](https://i.stack.imgur.com/hNd0u.png)](https://i.stack.imgur.com/hNd0u.png)


The original publication ([DOI: 10.1021/jm9804376](http://pubs.acs.org/doi/abs/10.1021/jm9804376?journalCode=jmcmar&quickLinkVolume=42&quickLinkPage=593&selectedTab=citation&volume=42), *J. Med. Chem.*, **1999**, *42*, 593-600) equally includes similar conversions with racemic secondary substrates like (*R*/*S*)-($\pm$)-1-methylpentyl bromide to yield (*R*/*S*)-($\pm$)-*N*-(1-methylpentyl)phthalimide which in turn was then converted into (*R*/*S*)-($\pm$)-(1-methylpentyl)amine hydrochloride.


 2