Fix random warnings in routes compilation

@jroper

See #3052.