WFLY-3478 fixing mask verification
Merge pull request #6439 from istudens/WFLY-3478_8.x

[8.x] WFLY-3478 fixing mask verification