[PATCH] Fix handling of the read-only attribute bit