Use defadvice instead of flet

See #1066 and #1117 for previous attempts.