Reverted the changes made in #2113 and #2186 that affected the USER_WORKING_DIR and built-in variables. This fixes #2206, #2195, #2207 and #2208.