Fix for scope error in #2751.