Add regression tests for 3188 and 3265