Fix logic error in dependency exclusion clause