Speculation here,
The Manual says that FOUND is a local variable initially set to False in PLPGsql functions. Maybe you can't access it inside the nested instance. Perhaps wrapping the nested part in a begin-end block of it's own will get you an instance