Registering chunks to load in sorted order

Fixes #3962