Fix function lookup in cache for unhashable functions
Fix type property checking bug