Hartogs-type theorems in real algebraic geometry, II