And b[x] there gives 1 as you would expect.
Write a = <||> before running the above code to test this on associations; associations are persistent, the symbol table is not.