Fixed #17795 -- Pass kwargs to generic views context

Thanks to Ed Crewe for reporting the issue and Fandekasp for
providing the patch.