Fix a bug with SQLite causing data to be retrieved incorrectly leading to jobs not remaining as needing whitelisting across restarts