Sorry for the spam, but I think this is definitely a bug/regression in ghc-8.8.1 (still present in 8.8.3).
I don't know which commit introduced the problem, but it seems that getModSummary is no longer reporting the correct ms_hspp_opts, at least for an in-memory file but it could also be for a file on disk as well (I haven't excluded that as a possibility).
Here is my workaround
#if MIN_VERSION_GLASGOW_HASKELL(8,8,1,0)
dflags <- GHC.getSessionDynFlags
let file = GHC.ms_hspp_file modSum
buf <- case GHC.ms_hspp_buf modSum of
Nothing -> liftIO $ hGetStringBuffer file
Just b -> pure b
let pragmas = getOptions dflags buf file
(dflags', _, _) <- parseDynamicFilePragma dflags pragmas
let modSum' = modSum { GHC.ms_hspp_opts = dflags' }
#else
let modSum' = modSum
#endif