#JC-1504 Removed unreachable branch condition. Added tests.