Store the variable_indices in `CodeObject` instead of discarding them after code generation