Oh wait, already have something similar.  Rebase off of the latest master and it should be more obvious what to do.