only output the top-level (last) LIB_DEFN

fixes #1321