Get template part using a custom taxonomy term

leanda reports that the problem has been resolved:

Solved it by changing array_pop to array_shift.