Fixes #5171: Set path before usage