Further fix for #497 to deal with issues around xpages generated button clicks reported by Rich.