The flail unit is indeed supposed to have friendly fire! In the next build there will be a big ui warning if you're going to hit an ally, to reduce confusion.
I see. Thanks!