I had the same problem until I moved my expect functions files from the "generated" packages onto somewhere else in the common main. I don't face that problem anymore.