Back out f4d4e6354662f2e49e4eabefa4371df762ba71d4 - this was just to demonstrate that the problem can be worked around by disabling statement preparation, but ultimately we don't want this behavior in the master branch