Tweak type checked fix to use Map

Slightly less invasive solution than LinkedHashMap.

Fixes #2