Prevent duplicate dynamic linking

This fixes a bug where :r would stop type providers from working.