OP-1283 Matrix inversion outside loop, mapRect called once