Add direct query capability for macros and typedefs. Fixes bug 1033677