[MGWT-315] Proper fix, with integration test.