fix scope bugs per Klaus Becker's examples

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>