Improve indexing of MathProgDicts