extend security domains sample
scope ids are carried along for debugging purposes
provide some diagnostics about scopes used to declare statements