Add missing test, restore deleted line (#3988)