File tree rename issues fix, part 1

This fixes:

* #9264 
* #9217 
* #9228 

cc @ingorichter 
OK, I added a constant (we don't have any global constants for those).