HPCC-10543 Fix problem generating IR for libraryscopeinstance

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>