The finish line only extends to where it would meet the red wall in the images below. If you cross backwards over the finish line while on the other side of the red wall, the game won't subtract your lap and will think you drove around the whole track.
This can be done in 150cc, but it's not free or anything.