Fixed MS4525 error flag handling

This fixes a missing bit shift for the error flag + code style. Needs a proper bench test, but should then be good to merge. Fixes #756.