One statement that have more than one different tables to update with autoinc columns just was marked as unsafe in mixed mode, so the unsafe warning can't be produced in statement mode. To fix the problem, mark the statement as unsafe in statement mode too.