SI-3871 Missing test case for protected bug.

c39f26382dddaa7 fixed the bug but didn't commit a test case.
SI-3871 Testing protected access against the spec

I've marked a few minor cases in the test with !!! where I believe
the behaviour goes beyond the spec.
Merge pull request #3026 from retronym/ticket/3871

 Tests for protected access