Fixed `ExtensionTest/CocoStudioComponentsTest` crash after applying PR #6001.