Failure to comply with any procedural provision of this Code does not invalidate a punishment imposed pursuant to the Code, unless the error materially prejudiced a substantial right of the servicemen or servicewomen on whom the punishment was imposed.