Addition theorems, $D$-spaces and dually discrete spaces