Math Shortcuts in Language Models for Dynamic Predictions