I've been working on this problem for a while ( a year or so now) and the hardest part is providing enough space for the locking piece to engage between the stop pin and the tang while simultaneously not making a giant (see ridiculous) ricasso/choil.
If you want to see how they solved the problem, you have no farther to look than the Szabo folder which has all of the pieces in place to be a flipper. IIRC, that design started as a comp-locked flipper. If you look at how they treated the problem I describe, you will see real genius.