[sr-dev] git:master: modules_k/rls: Tidied up some of the DB query stuff in RLS