Fix handling of literals and local vars