Teach formulas about their id

This allows writing formulas that can adapt depending on what script
they're in.