Prevent duplicate hooks for dynamic classes loading