If the criteria of the package is ! Custom.Test=1 and the package installs the property of Custom.Test=1 this would install then show orphaned as you are experiencing. This is because as soon as you set the Custom.Test=1 property the device is no longer valid to download the package.
Regards,
Nick R