Some minor tweaks to the util lexical cast and capture functions