My crystal ball tells me you're confused by the fact the the generated symbols are not interned: while the symbol's name is `G564` it is not the same symbol you get if you `(read-from-string "G564")` because it is not added to `obarray`.

Maybe the simplest fix is to `(put ',key 'lispdoc-section-handler ,sym)` so you can just check `(get key 'lispdoc-section-handler)` rather than having to loop over the obarray.