In IITC 0.14.0 things changed - window.portals now always contains data for all portals, even if they're not added to the map.

Therefore
1. no need to check if the guid is in window.portals
2. instead, you will want to check if map.hasLayer(portal) before trying to bring to front