Fix $member not allowing to access private/protected members.

Add more tests for the $member.