DB/SAI: Fix scripts using SMART_TARGET_NONE that were 'broken' by 9653576cb4cc9449898d6af691c045d68e9361c5. 'Broken' is quoted because scripts using SMART_TARGET_NONE are most of the time broken by default anyway.
DB/Errors: Db error clean up

By @untaught fixes #11116