resolve function formals on autocomplete; reorder shortcut context checks