[haskell mode] Fix unintended prototype property access bug

Closes #1917