failing spec for attachment definitions
traverse ancestors to find definitions
Refactoring of previous commit