[Koha] Bad index while coercing array into hash