Revert "[ticket/11768] Removed unused var"

This reverts commit 49cb61057dad62e4520199a2a24c4bba9914aee9.