Fix #734 regarding overlapping open imports

Properly combine imports such that two open imports do not cause an
“ambiguous usage” error. This was particularly problematic since Text
became partially open in the Prelude, meaning that “import Text (..)”
could cause needless ambiguity errors.