[BUGFIX] Prevent malformed SQL query in AbstractDatabaseRecordList