SI-3871 Tests for protected access

c39f26382dddaa7 fixed the bug but didn't commit a test case.

While I was looking at this, I added a test to exercise protected more thoroughly.

Review by @gkossakowski