Fix wrong method name

`valid_app_const?` -> `valid_const?`

This applies to master, 4-0-stable and 4-0-0.