Fix autoupdate condition check (issue #3877)