Fix a bug in -foptimal-applicative-do