Widget Factory: Fix test with multiple var statements