Add support for negative indices.

These are not handled natively by the CDMR protocol, so translate them
locally. Also add tests.