atl: Properly compute const-ness for a function statement.

Fixes #449.