mage tab parsing: fix scope