Rebuild RWP as OSIS, taking special care to correct references