Here is something I've found when using createvehicle:
OFP will not put the object exactly where you want it. It's position will be effected by the other objects around it, and it will tend to end up in the nearest 'free' space.
Sometimes this is fine, as the object isn't being placed right in the middle of things. But if it is (and it ends up in strange places, like in this case), here's how you fix it...
Create your object at any old position. (eg. [0,0,10]). Now use setpos to put your object where you actually want it...
You can put things inside of walls with setpos, as it doesn't seem to have a clipping function like createvehicle has...
So to summarise, try this line here:
wh1 = "SecondaryWeaponHolder" createvehicle [0,0,10]; wh1 setpos [getpos table select 0, getpos table select 1, (getpos table select 2)+1]; wh1 addweaponcargo ["FDF_lv217",1]
Hope that helps you out