Reducing CPU usage as a result of unloading chunks.

The chunk unloading process was unnecessarily intensive. This patches that by replacing a loop-based check with a simple string-based lookup. This should address issue #484.