Copied change from 3.1 verify method to fix issue #578 caused by Integer comparison failing due to unexpected auto-boxing behavior.