[BUGFIX] Fix invalid use of array_pop

This fixes https://github.com/FluidTYPO3/flux/issues/578