The important bit here is that expiration failure "glitch", and the details thereof. If it's just a straight up glitch and the law called for the expiration of the RINs after one crossing then this is a pretty clear-cut case of fraud. If a bank error puts a million dollars in your account, or if a car falls off a shipping truck into your front yard, that doesn't make it yours. By the same token, a glitch in the expiration system doesn't make exploiting that glitch legal.
I assume the companies ran this by legal before going forward with the plan. Loopholes aren't illegal, they're just exploits.