fix stacklevel of updates dictionary warning

Before this PR, the existing warning prints out the location of the warning itself, but the problem is with the user code at stacklevel 2.