Add scoping rules for constant inlining