Properly named variable inside block

Closes #9824.
Removed unnecessary block
Merge pull request #9833 from choudhuryanupam/fix_active_schema_test

Removed unnecessary block