SWC-1617 and SWC-1622

Add a test for this change.