Adds missing (lg^d n).