Fix some bugs that got uncovered while trying to get liteloader 1.7 to work
Merge remote-tracking branch 'upstream/feature_derpstances' into feature_derpstances