Stereochemistry: synthesis of an epoxide

This is a procedure to synthesize a propylene oxide.

I wonder if the inversion occurs or not after the reaction. That is, I want to know which product is correct in the diagram above.

I thought that this reaction is an SN2 reaction, so inversion occurs. However, I'm a little confused because the whole reaction is intramolecular. Is it correct that this reaction is SN2, and the inversion occurs?