since it's pl/sql code I would consider tune shared_pool_reserved_size parameter, may be by increasing it you could get rid of this problem