Refined string test; added tracking max-presentation depth.