Hello N.,
The sub-diagram is independent of the host diagram.
If you will use sprite on sub-diagram, you must to add on, as:
package P2 [
{{
sprite $foo1 {
FFFFFFFFFFFFFFF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
FFFFFFFFFFFFFFF
}
cloud "a<$foo1>b"
}}
]
If that can help,
Regards.