Fixes for local debug declarations.
Correctly mark generated variables.