Tests for Bug-966834 and Bug-974730