Fix some careless code redeclaring a variable declaring a variable in a condition so that these don't generate errors Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>