Nevermind, I’ve managed to solve it. For anyone interested, the problem was ‘category__in’ isn’t support by custom post types so instead needed to edit the $args array to include ‘tax_query’.
$args = array(
'post_type' => 'libraries',
'tax_query' => array(
array(
'taxonomy' => 'library_types',
'terms' => $category
),
),
);