I recently purchased a new M16 upper receiver, upper mech box, and rear-wired lower mech-box for my ICS M4A1. After confirming the shimming on the lower mech-box and installing it I put the new upper receiver on my gun and started testing it out. I found that the Semi-Auto wasn't firing properly. Sometimes it would fire a single shot, other times two, and sometimes it would go full-auto.
I pulled the gun apart again and made sure the selector switch, cut-off lever and anti-reversal latch were moving freely. When I put the mech box back in the gun I tested the movements again and found that the anti-reversal latch was rubbing against the body of the gun. I filed it down by a mm or so until it moved freely.
As you can see here.
Testing again with the new upper receiver still produced the inconsistent semi-auto. I put the original upper receiver back on and found it fired in semi-auto consistently with no problems. Looking at the new upper receiver closely I noticed that the forward assist button was not working as smooth as the original receiver. On closer inspection the part of the forward assist that pushes against the anti-reversal level was not returning fully to the rear position each time it was pushed forward.
See this picture
I removed the upper mech box and loosened the screws holding the forward assist lever slightly until it started moving smoothly, then applied a little bit of graphite lubricant to it and put the upper mech box back in, put the gun back together and it's firing on semi-auto consistently now.