Added some regression tests from patch #2321830