Not sure how to do this, how it is practical, etc ... but perhaps we can have a global e.g. VECSXP to implement preserve/release as some sort of a loose stack.
The problem is to to combine this with the header only business. Perhaps each client (.so) gets its own stack.