covariates: Fix insertion index computation
covariates: Fix insertion index computation

Inserting a new element in the local table invalidates any previously
computed insertion indices. Compute the insertion indices for M, I and
D keys prior to inserting the corresponding entry in the table.

broadinstitute/firepony,broadinstitute/firepony,NVlabs/firepony,broadinstitute/firepony,broadinstitute/firepony,NVlabs/firepony,NVlabs/firepony,NVlabs/firepony