Issue #3402713 by mstrelan, smustgrave, dww: Fix strict type errors: miscellaneous fixes in core Kernel tests (cherry picked from commit f60bcea7)