More compute_allocation() fixes.