Don't attach packages loaded by internal code

- New compatibility setting
- Migration code
- Tests

Fixes #104.