Check options before warning about source imports.

Authored by rpglover64.

Description

Check options before warning about source imports.

Summary: Fixes T10637

Reviewers: austin, bgamari, thomie

Subscribers: dfordivam, simonpj, thomie

Differential Revision: https://phabricator.haskell.org/D1157

GHC Trac Issues: Trac #10637