limit=0 meaning unlimited is a little surprising to me, I'd prefer that it return 0 items.

Should just need to add "is not None" to  line 569 and 599.