That's exactly what shimming would do, pop some iron sights on the rif and see if you can zero them... if they don't zero, then you might want to consider checking the barrel is attached correctly.
I had an HK416 that a badly fitted barrel nut by the previous owner, a quick unscrew &...