add better handling of multiple additional_scopes for #161, #165 and #167