BS-1511, add exception early when gateway are not merged correctly