Support primitive scalar types in filters
Fix bug triggered by calling instance_root on type_graph