[RCD] attachment handling fix for svn trunk