fixing xref testing

Not functional yet because the external def discovery happens too late
moved testing to the end

after lexing, tests are still borked.
moved testing to end II

fixed tests excelt 006 which was borked before anyhow