Fix a bug in Material
Fix a bug in Material

There was a problem in the scattering matrix construction that led to incorrect
max group when the last group should be max group.

youngmit/mocc,youngmit/mocc,youngmit/mocc,youngmit/mocc