Numerical boundary layers and spurious residual flows