fix for issue #10483

fixes #10483
Same here, use a variable to avoid calling `.find()` multiple times.