typefindfunctions: Add missing length check to XML typefinder