[KERNEL32] Fix handle leak and caching (follow-up of 7e38267)