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