Fix a small bug on an error path introduced by the hashtree patch.