Node fs.copyfileSync hangs when source and destination are identical

Unless the fs.constants.COPYFILE_EXCL flag is passed, when source and destination are the same, Node hangs forever.

const fs = require('fs'); 

fs.writeFileSync('foo', 'Hello World!');
fs.copyFileSync('foo', 'foo');

//Never reach here
console.log('Done');