Fix more problems with privateExtension

Add missing references to options.protected and remember to return the replacement.