Fix: Make sure no-unused-vars doesn't get confused by nested functions (fixes #584)