Fix wrong replacement of ends_with functions with '/'