Add test
Minor simplification in COMPILE-FUNCTION