First, that's an improper use of break;
Second, neither duplicator copies variables (like isDrug) on duplication. If your drug bricks use a special datablock, you can check if %brick.getDatablock().isDrug, but it won't copy isDrug off the actual brick.
Third, you can get the mounted image by calling %player.getMountedImage(0).getName().