HHH-8193 - Reset input stream before binding

Patch and test for HHH-8193 JIRA ticket.
Link: https://hibernate.atlassian.net/browse/HHH-8193

Best regards,
Lukasz Antoniak