Added a fix to check if pagination is supported by the layer being used for a query. Similar to this fix suggested by Esri here https://geonet.esri.com/thread/136393
Gets around the issue described here http://support.esri.com/EM/knowledgebase/techarticles/detail/45207