Fix for "Ensure set_prepare_statement is called once"