If you're let go for being too old, and no other company will hire you because of your age, would you feel the same way? If so is it just age you're comfortable with as a vertical for discrimination?
A senior dev might ask for a higher salary and the increased productivity (due to experience) might not be required for that role.
If it made sense from a financial pov - I'm sure there wouldn't be an issue...