sl2: Only treat a function as pure if it's also const.

This lets us redefine a const function and get away with it.