Not sure why this was changed. Fix newCustomLayer behavior.