clean up code a bit

- better check_deref_volatile method
- consider external volatile fact when generating local vars