Some .dpr templates use "program;" without a name, which produces an empty moduleName in the AST. Fall back to the filename (without extension) to prevent nodes with empty names that cause downstream FK constraint errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>