Fix #1149 by handling "d" and "(dd)" types separately