Revert "Better error message when setting values on directories"

This reverts commit d13dd50d5107b10eaeda734d971cd4512cb4a304.