Dynamic icons does not work. You have to declare each icon name as a comment in the header to be able to use them dynamically in your app.
The reason is the icons is only included in the build if they are present in the app at build time. Dynamic data is not present at build time and therefore does not work.
I created a page with an obscure URL path where I just dropped an instance of the icon element for each icon that might be displayed dynamically. It’s a bit of a pain but it works.