Fix media library's input items reference counting