TIMOB-12558 Fix arc-incompatible code made afterwards.

Backport of fixing ARC-unfriendly code.