Merge "Doze: Better handling for non-default templates." into lmp-dev