improved handling of declaration modifiers