[PropertyAccess] Simplified code

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12275
| License       | MIT
| Doc PR        | -

Makes implementation of #10882 more readable.

Simplifies `camelize()` as pointed out in #12275.