Fix error in Chain matrix update.

Rotations were calculated in the wrong order