Tweak checking for current request

segment is not always available in the normale Request, but is in the
app request.