Merge "maintenance: Replace manual IN query with select wrapper"