Fixed PHP-928 and PHP-1060: read only properties for inherited classes.
Added two more test cases as per review.
Merged pull request #667