[GHC] #10446: Fix error message when variables in a static form are not in scope