Do not try to optimize declarations.

Using AST matchers to lookup bobox:box and bobox::basic_box as well.
It may be a bit slower, but code is more centralized and better
readable.