Add rewrite rule that fires on index calculations for MultiDim vectors.

This patch fixes #71 in the suggested way. I avoided the tracing since I'm afraid that it might cause our compiler to loop.