Not directly involved in this race, but I'll give some info and make a suggestion. When NASCAR does this, it's so they don't end under caution, and is purely for fan and TV interests. Also, when they do have a caution that causes this condition, they throw the red flag to avoid going around the track as many times as it takes to clean the mess up, which could cause fuel issues with cars, and that isn't good for TV ratings either.
So, when this happens, throw the red flag, stop the SC at a safe place (presumably on the back straight), and have the race steward (presumably with server admin rights) adjust the laps with the "/laps=##" command to make sure that when you go back to green, there are 2 laps to go.