Merge unittest fix from upstream.