Fix possible deadlock loading a chunk which was just unloaded.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>