Don't set a class variable when only a local one is needed

Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>