[BUG #8315] Improved fix to work generally.