The longer term plan is to allow using the same node groups in different
node tree types anyway. Also, the implicit field inputs is something that
shader nodes could benefit from soonish already.
This also fixes a bug where the geometry nodes specific declare function
was not used anymore since 38813a7441.