Use in folder if available, then out of folder

This fixes the case for marking from the search folder.