Prevent getParentElement from looking past the composer container

Task: https://next.getflow.com/workspaces/1/tasks/5605210