[5.0] Fix Composer Autoload Dumping For Commands

Similar to #6595