This past Monday I had gluten Could that be what caused it?
Not sure, but you may refer that to your Doc. In the mean time you may want to experiment with this a little by trying gluten a few more times with the enzyme verses going totally glute free and monitor your BM's from these two test.
Hopefully your magnesium or any other meds or supplements are not reacting with the digestive enzyme your taking, making it less effective.
HTH GL