Compiler: Reduce the amount of code duplication somewhat. Adds internal function add_identifier(), to help set up the argument and call debug_add_to_identifiers().