Changes the shadowing logic to permit methods.

Here methods includes defs, vars and imports in objects,
since these define methods.
This version doesn't yet work correctly for top-level vars;
specifically, it objects to 'isStandardPrelude' in collectionsPrelude,
presumably because it is already defined (as a method) in
StandardPrelude.