[#2653] Remove uncessary range checks for performance reasons

Motivation:

I introduced range checks as part of 6c47cc97111146396d2daf1a97051135d2eaf69e in some places. Unfortunally I also added some where these are not needed and so caused a performance regression.

Modification:

Remove range checks where not needed

Result:

Fixed performance regression.
[#2653] Remove unnecessary ensureAccessible() calls

Motivation:

I introduced ensureAccessible() class as part of 6c47cc97111146396d2daf1a97051135d2eaf69e in some places. Unfortunally I also added some where these are not needed and so caused a performance regression.

Modification:

Remove calls where not needed.

Result:

Fixed performance regression.