Fixed bug that didn't allow the connection to the SQLite database to be closed when quoting a value using the Platform object
Merge branch 'hotfix/5887-master'

Close #5887
Fixes #5228