fix variable reference

regression introduced in commit a970facfddde1ea62b268fc0d94da4d834e0d781 for Redmine#4507