Changes to isChildOfX functions to accomidate nested blocks