It does not go through a substitute. The substitute will fail instead.
I just tested with Poke'Slash.