LPS-41243 Prevent ConcurrentModificationException when filtering template handler list