Avoid in-line variable creation in double-nested functions