How to add attachment points to custom models?

I altered a treasure model and would like to attach some objects (chickens) like pictured below. However, anything I try to attach is placed at the object origin.

How do I make it recognize the bones I want to use as attachment points? Is there something special I need to define in the model? Or does it require a specific animation for this? Or am I just missing a piece of code?

<animfile>
	<definebone>bone_main</definebone>
	<definebone>bird1</definebone>
	<attachment>bird<include>units\animals\chicken\chicken.xml</include>
	</attachment>
	<component>nest<assetreference type="GrannyModel">
			<file>nuggets\nest\nest</file>
		</assetreference>
		<decal>
			<effecttype>bump</effecttype>
			<texture>nuggets\dropped_resource\dropped_resource_decalA</texture>
			<selectedtexture>shadows_selections\selection_square_128x128</selectedtexture>
			<bumptexture>nuggets\dropped_resource\dropped_resource_decalA_bump</bumptexture>
			<width>9.00</width>
			<height>9.00</height>
		</decal>
		<attach a="bird"
		        frombone="bird1"
		        tobone="bone_main"
		        syncanims="0"/>
	</component>
	<anim>Idle
		<component>nest</component>
	</anim>
</animfile>