A property which guarantees termination in weak combinatory logic and subtree replacement systems