Add a comment explaining the recursive leaf index calculation functions.
Re-write the comment for clarity.
A detailed description of how leaf index coordinates are calculated from multi-dimensional grid co-ordinates, and guidance for how to support negative co-ordinate values.