Fix disableAutoFetch regression

After PR #5263, setting `disableAutoFetch = true` no longer works correctly (the entire file loads). This is a tentative patch that attempts to address that.