New job != new company. One could transfer internally, or find a project involving X and contribute, or in the right environment, come up with a new project entirely.
If you don't have the autonomy to learn new X's as you wish, then your job probably doesn't justify aversion to looking elsewhere... unless it's paying you hedge-fund money.