[#52] Fix and simplify strict type guessing code