Fix bug in erfinv GPU optimization

Reported by @abosamoor in gh-1293