Actually, it is also goes other way too.
In a stagnant company which is laying off people, probability that you will be laid off increases with seniority (and your salary). And decision to be laid off is completely outside your control: the entire project can be just closed. So if you are less risk-averse you better move to growing company from stagnant one.
But I would love to see some facts numbers behind this.