Merge "Replace the zero handling in extend_to_full_distribution."