Work on #196 for toplevel attributes
more tests for #201 (on toplevel attributes)