Fix expanding the top-most chunk of a file.

The logic for handling chunk expansion was doing a truthiness check on
chunk_index, instead of comparing it to None, preventing chunk 0 from
expanding properly. We now compare to None, like in all other cases.

Fixes bug #3026.