> this is little consolation if you're irreplaceable
This is probably the biggest mistake people make when talking about leaving a job.
So few employees are truly irreplaceable that you may as well just say that no employee is irreplaceable. It's good for the ego to believe you are but the truth is that companies make do, get by, and recover.
Honestly the "irreplaceable" people I've seen who do leave have been so egotistic and strong-willed that things end up better in the long run.
Note to anyone reading this: Please don't reply and say "well in my case..."