don't optimise for the uncommon empty array case