Effect of multilayer ice chemistry on gas-phase deuteration in starless cores