[PTFM-9573] Also treat the trailing slash case correctly