Fix Issue 5299 - Protected inheritance is semantically undefined

Deprecation -> Error
Merge pull request #3911 from yebblies/issue5299

Issue 5299 - Turn base class protection into an error