correct Doc::addATag (closes #4011)