OOHHH CRAP... Ijust fixed a problem like this awhile ago, but I cant remeber how.... I think it was something to do with the unit building it... It needs its races rapiar type (so something with a human icon for building would need a human repair). I think that might be your problem, but I might be wrong.
If I'm wrong, CnP the unit and building into a blank map and I'll look at it. I always remeber when I get to manipulate things to my liking