Fix how we figure out active contents when closing
Fix how we figure out active contents when closing

Fix #45 again

For tests see:
https://github.com/brave/browser-laptop/issues/8875

Auditors: da39a3ee5e6b4b0d3255bfef95601890afd80709@bridiver

diasdavid/browser-laptop,timborden/browser-laptop,timborden/browser-laptop,timborden/browser-laptop,timborden/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,diasdavid/browser-laptop,luixxiul/browser-laptop,luixxiul/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop