Remove 'using std::errro_code' from lib.
Extend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag in the right place.