Attempt a fix for #2874