I suppose it's possible that BZ did that, but it is most likely that BZ took him by surprise. Hashi was a sage so he was better at sensing different chakras than Madara. I think Madara's complete faith in the fact that BZ was his will is what did him in. I just don't think Madara even thought it was possible for BZ to betray him.