Explicitely pass the array, don't abuse global scope

We really shouldn't abuse the global scope, for things like $context its OK (and even at cases like that, I still argue we should pass the value) but for specific cases like this one, we really should pass the var.

Signed-off-by: Suki <suki@missallsunday.com>