Fix API for featureLayer. Fixes #668