activeLayers never had a merge method. Layer has one. Not a solution, but this might give you some insight: