doc: fixed loop scanning for Ddoc comments.