fixed a bug in the raising/lowering of dummy indices and extended it to work