Fix command-line scripts broken by more aggressive external entry point