[PLAT-4391] Fix problem loading a portfolio containing a security without an external id