test for nested fragments when comparing with TRIM_SPACE