Fix for HEX-1486. Forgot to check if .Last exists before removing.