Better algorithm for detecting closured fun literals