bug(dd-lib): fix bug that didnt identify directives used incorrectly based on restrict property