I have the following piece of code inside an h:form
You are not going to like my answer, but this is not a bug.
Primefaces Issue 1642 is marked as Won't Fix.
The Primefaces Captcha utilizes Recaptcha, which does not and cannot support Ajax refresh. You must do a full page postback for this component to work properly. Keep in mind this also affects the ability to use the Captcha in components that require Ajax refresh of a panel, such as a Tab View or Wizard component.
EDIT: On another note, it might be possible to use the captcha component within an to achieve a similar effect, but that seems like a dirty hack. Sorry I couldn't be more of a help.