proper processing of dom indices, 2
(cherry picked from commit e9d6759)
EA-52867 (null check)