Add working test for issue 3935 and xfailed test for issue 3888