Test that encoded constructor handles bad input properly.