LOOP: Correctly implement MXLOOPS and add a test.