A remark on a Liouville problem with boundary for the Stokes and the Navier-Stokes equations