Immersed essential surfaces and Dehn surgery