Imagine the following file:
// #ifndef FLAG
// #include_once "same/file.js"
// #endif
// #ifndef OTHERFLAG
// #include_once "same/file.js"
// #endif
processed with {FLAG:true}
The file "same/file.js" isn't in the result. It gets written at the place where the first include_once occurs but gets removed because of the ifndef. The second time it doesn't get included because it already got included.