Finish fixing me.ImageLayer.ratio bug on Firefox & Opera

Since commit b786bc9e10965c7a6fd94307e3080278a68b2991, it was possible for
the position vector to stretch beyond the limits of the layer. This patch
uses a final modulus to clamp the limit.