[DF-581] Const variables, minor fix copying debug information