Mechanisms of refinement of avian nest defence behaviour