insertLayer can insert in places other than the end, if specified