I fixed the error by changing the if condition from:
if ( wpcf7_is_posted() )
if ( wpcf7_is_posted() && isset( $_POST[$name] ) )
This is the check that the Contact Form 7 plugin does for text fields, see this line.
Might this be a fix that should be included in the next version of your plugin, or was something else broken on my side to begin with?