Set moduleRecords on the loader

Sets moduleRecords on the loader so that they are not shared when
multiple loaders are running at the same time. Fixes #222