simplify write_include() and drop write_single()
write_include() was the only user of write_single(), and write_single() had some include-specific code. This patch gets rid of write_single().
write_include() gets a simplified version of the code instead of calling write_single().