Better error reporting for static final fields