This pattern is now complicated and duplicated (instead of only duplicated previously). Perhaps a candidate for a method extraction?