Cherry picked EUCA-9297 fix from maint/3.4/testing