A great job with a bad leader - is hell. You will see what can be done, want to get it done but be prevented from achieving it. Learn from this bad leader what a great leader looks like. Modify your ten year goals to find organizations with great leaders.
A bad job with a great leader - is great. A great leader will create a great team. You will learn from those around you. You will have a great time. You will be helped in finding that better job sooner rather than later. Give it time; follow the leader. This is just life's speed bump in your ten year goals. Hit the speed bump hard and launch yourself. Great leadership will teach you a lot about overcoming obstacles - learn from it.
A bad job with a bad leader - run don't walk. Be grateful you aren't on the old defined benefit pension plan. Modify your ten year plan to never make that mistake again. Discard your job and the leader before they discard you.
" What one piece of advice would you give to the new generation of IBMers"