Turning on optimizer changes behavior in 7.10.3
The repository at https://github.com/ddssff/ghcbug contains a four module package that works when compiled with -O0, but fails when compiled with -O2. The cabal file builds working and failing executable.
One of the modules has OPTIONS_GHC -O0 in the header, so the bug is related to mixing modules with different optimization levels. Other than that, I have little idea what is going on.
The bug was present in 7.10,2, and is definitely still present in 7.10.3-rc1. I doubt it has been fixed since then.