Thanks for the update! That's a much simpler solution than I came up with, and of course seems obvious once I saw it (for anyone who does much vanilla redstone, anyway).
For anyone else, he used a redstone block between two pistons to keep track of the state. Watch the video, it's worth the time.