Fix a bug in the dirty bit when not partial loading

This also ensures that the change tracking hook is buffer-local.
Merge pull request #183 from david-christiansen/fix-load-tracking

Fix a bug in the dirty bit when not partial loading