Fix Issue 5299 - Protected inheritance is semantically undefined

Deprecation -> Error