fdo#74148: sfx2: fix crash when editing template

SfxTemplateManagerDlg::OnTemplateEdit() accesses invalid iterator
because during loadComponentFromURL() it happens that
ThumnailView::LoseFocus() is called and maSelTemplates is cleared.

Change-Id: I074a70e5ce8bc89a38b720ddd0325c69c1d2b9ff