Fix variable scope in augeas resource