I would guess you are having problems with the attribute for the FiberParentClassModelName field. When the device placed in a rack, make sure the value for that field is RACK (assuming that is the specific object model name of the F_Rack. When the device is placed directly in the PatchLocation, I suspect it works because that is the default value for the field.
Suggestion: If the device is placed in multiple stuff, kill the default value for the FiberParentClassModelName field of the F_Device. As an ArcFM Property, make it also mandatory which will force the user to specify the parent. You can also lock this down to a created domain of the possible parents if you want to, but is not necessary.
Let me know if this helps you out.