Fixes #4270: Move r30722 to v1.7 branch (Check equality instead of bit-mask)

---svn-pre-commit-ignore-below---

r30722 [[BR]]
Check equality instead of bit-mask - thanks to Tetsuya Mishima for reporting it

cmr=v1.7.5:reviewer=ompi-gk1.7