complete fix for testGetFunctionsFromReference